package com.cskaoyan.servlet;

import com.cskaoyan.bean.Student;
import com.cskaoyan.bean.TestList;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@WebServlet(value = "/demo2", loadOnStartup = 2)
public class testServlet2 extends HttpServlet {
    static {
        TestList.add2StudentList(new Student("zs",1,"1231123"));
    }
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        System.out.println("second！！！");
    }
}
